IsDateTime

Basic and Crystal syntax.

Overloads
Arguments
Returns

Boolean value (True or False).

Action

IsDateTime returns True if the given String or Number value can be converted to a valid DateTime and returns False otherwise. A valid DateTime is any date-time between January 1, 100 through December 31, 9999.

Typical use

If you want to convert a String value to a DateTime using the functions CDateTime or DateTimeValue, use the IsDateTime function first to check if the conversion will succeed. See the examples section of IsDate for an example of this type.

Examples

The following examples are applicable to both Basic and Crystal syntax:

IsDateTime ("September 30, 1999")

Returns True since the given string "September 30, 1999 is interpreted as the DateTime value September 30, 1999, 12:00:00am.

IsDateTime (-100.2)

Returns True since the given number argument is interpreted as the DateTime value September 20, 1899, 7:12:00 pm.

Comment

This function is similar to the Visual Basic function IsDate.



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com